chain rule of trig function and natural logarithm